package com.lostad.app.vert.util;

import java.util.HashMap;

import com.fasterxml.jackson.databind.ObjectMapper;

public class JacksonUtil {

    private static ObjectMapper m = new ObjectMapper();;
    public static String toJson(Object bean) {
    	String json = null;
    	try {
    		json =  m.writeValueAsString(bean);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return json;
    }

    public static void main(String[] args){
    	System.out.println(toJson(new HashMap<>()));
    }
}